#ifndef _MYRDIS_H_
#define _MYRDIS_H_

#include <string.h>
#include <stdio.h>
#include <pthread.h>
#include <sw/redis++/redis++.h>
#include <iostream>
#include <string>

using std::cout;
using std::endl;
using std::string;


class MyRedisPlus
{
public:
    static MyRedisPlus *getInstance();
    /* bool connect(const string &host,const int port); */
    string get(string key);
    void set(string key, string value);
private:
    static MyRedisPlus *_pInstance;
    /* redisContext* _pConnect; */
    /* redisReply*_pReply; */
    static pthread_once_t _once;
    sw::redis::Redis _redis;
private:
    static void init();
    static void destory();
    MyRedisPlus();
};//end of MyRedis;
#endif
